package com.qboot.websocket.service.impl;

import com.qboot.common.entity.Result;
import com.qboot.websocket.config.WebSocketServer;
import com.qboot.websocket.service.WebSocketService;
import org.springframework.stereotype.Service;

/**
 * WebSocket 接口实现类
 *
 * @author Tellsea
 * @date 2023/2/17
 */
@Service
public class WebSocketServiceImpl implements WebSocketService {

    @Override
    public Result sendServerToClient(String userId, String message) {
        WebSocketServer.sendInfo(userId, message);
        return Result.ok("发送成功");
    }
}
